// const baseUrl = '/mogu' //线上
const baseUrl = '/mogu' //本地运行需要代理

const apiList = {
  getnewslist: '/api/getnewslist',
  addShopingCart: '/api/addShopingCart',
  updataShopingCart: '/api/updataShopingCart',
  GetShopingCart: '/api/GetShopingCart/?id=',
  deleteShopingCart: '/api/deleteShopingCart/?id=',
  
  GetProductDetail: '/api/GetProductDetail?id=',
  
  GetProductType: '/admin/GetProductType',
  GetOutPlay: '/admin/GetOutPlay',
  addProduct: '/admin/addProduct',

  GetProductHome: '/admin/GetProductHome',
  getProductBuyType: '/api/getProductBuyType?id=',
  searchProductBuyContent: '/api/searchProductBuyContent?content=',
  
  getnewslist: '/api/getnewslist',
  Login: '/admin/Login',
  Register: '/admin/Register',
  uploadFile: "/upload/file",

  UpdateUserInfo: '/admin/UpdateUserInfo',

  //加密参数
  encrypt: '/api/encrypt',
  getPhoneCode: '/api/sendVerifyInfo',
}



function dealApi() {
  for (const key in apiList) {
    if (Object.hasOwnProperty.call(apiList, key)) {
      apiList[key]=baseUrl+apiList[key]
    }
  }
  return apiList
}
export default dealApi()